/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include <device_functions.h>
#include <device_launch_parameters.h>
#include <cuda_runtime.h>
#include <cuda.h>


#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <thrust/reduce.h>
#include <thrust/extrema.h>






#define COUDA_CALL(x) {const cudaError_t a = (x);						\
	if (a != cudaSuccess) {												\
		std::cout<<"cuda err:"<<cudaGetErrorString(a)<<a<<std::endl;	\
		cudaDeviceReset();												\
		assert(0);														\
	}																	\
}																		\


//规约
//float thrustResult = thrust::reduce(最大速度_ptr, 最大速度_ptr + 粒子数);

#define DEF_防止除0补偿值 0.00000001f



